package com.glsc.ngateway.flowable.listener.createamproduct;

import org.flowable.engine.delegate.TaskListener;
import org.flowable.task.service.delegate.DelegateTask;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.stereotype.Component;

@Component
public class CreateAmProductStartHandler implements TaskListener {

    private static final Logger logger = LoggerFactory.getLogger(CreateAmProductStartHandler.class);


    @Override
    public void notify(DelegateTask delegateTask) {

//        try {

//            //出入金用监听
//            String[] crjGroup = {"lx1", "lx2", "lx3"};
//            delegateTask.setVariable("cswhGroup", Arrays.asList(crjGroup));
//            delegateTask.setVariable("cswhGroupSize", crjGroup.length);
//
//            delegateTask.setVariable("csfhGroup", Arrays.asList(crjGroup));
//            delegateTask.setVariable("csfhGroupSize", crjGroup.length);
//
//            delegateTask.setVariable("gzjsGroup", Arrays.asList(crjGroup));
//            delegateTask.setVariable("gzjsGroupSize", crjGroup.length);
//
//            delegateTask.setVariable("taGroup", Arrays.asList(crjGroup));
//            delegateTask.setVariable("taGroupSize", crjGroup.length);
//
//            delegateTask.setVariable("ta2Group", Arrays.asList(crjGroup));
//            delegateTask.setVariable("ta2GroupSize", crjGroup.length);
//
//            delegateTask.setVariable("yyzjGroup", Arrays.asList(crjGroup));
//            delegateTask.setVariable("yyzjGroupSize", crjGroup.length);
//
//            delegateTask.setVariable("dzhtGroup", Arrays.asList(crjGroup));
//            delegateTask.setVariable("dzhtGroupSize", crjGroup.length);
//
//            delegateTask.setVariable("xpGroup", Arrays.asList(crjGroup));
//            delegateTask.setVariable("xpGroupSize", crjGroup.length);
//
//            delegateTask.setVariable("byfjGroup", Arrays.asList(crjGroup));
//            delegateTask.setVariable("byfjGroupSize", crjGroup.length);
//
//            delegateTask.setVariable("xgmjqGroup", Arrays.asList(crjGroup));
//            delegateTask.setVariable("xgmjqGroupSize", crjGroup.length);
//        } catch (Exception e) {
//            logger.error("CreateProductNewStartHandler处理异常，结束处理。processid=" + delegateTask.getProcessInstanceId(), e);
//            throw new RuntimeException("CreateProductNewStartHandler处理异常，结束处理。processid=" + delegateTask.getProcessInstanceId(), e);
//        }
    }

}